package com.bigknow.appstore.web.base.service;

import com.bigknow.appstore.web.base.entity.Permission;
import com.bigknow.appstore.web.base.entity.User;
import com.bigknow.appstore.web.framework.service.IService;

import java.util.List;
import java.util.Set;

/**
 * Created by Administrator on 2015/3/20.
 */
public interface IDelegatingService extends IService {


    /**
     * 查询已经存在的用户
     * @param account
     * @return
     */
    public User findLoginUser(String account);

    /**
     * 根据用户ID查询权限
     * @param id
     * @return
     */
    public List<Permission> getPermissionsByUserId(String id);

    /**
     * 根据用户id查询权限,并返回set
     * @param userId
     * @return
     */
    public Set<String> getPermissionsAsSet(String userId);

    /**
     * 根据用户id查询用户角色名称,并返回set
     * @param userId
     * @return
     */
    public Set<String> getRolesAsSet(String userId);
}
